import request from '@utils/request'

// 获取列表
const getOrderList = async (data) => {
  return request({
    url: '/order/GetOrderList',
    method: 'get',
    data
  })
}

// 获取详情
const getOrderDetile = async (data) => {
  return request({
    url: '/order/GetOrderDetile',
    method: 'get',
    data
  })
}

// 更新订单状态
const updateOderStatus = async (data) => {
  return request({
    url: '/order/UpdateOderStatus',
    method: 'get',
    data
  })
}

// 取件
const updateOderQujian = async (data) => {
  return request({
    url: '/order/UpdateOderQujian',
    method: 'post',
    data
  })
}

// 德邦物流查询
const getWuliuMessage = async (data) => {
  return request({
    url: '/user/GetWuliuMessage',
    method: 'get',
    data
  })
}

// 京东物流查询
const ChaxunJD = async (data) => {
  return request({
    url: '/user/ChaxunJD',
    method: 'get',
    data
  })
}

// 审核书籍
const updateOrderItemShenghe = async (data) => {
  return request({
    url: '/order/UpdateOrderItemShenghe',
    method: 'post',
    data
  })
}

// 后台备注
const UpdateOrderHoutaibei = async (data) => {
  return request({
    url: '/order/UpdateOrderHoutaibei',
    method: 'get',
    data
  })
}

// 重推德邦
const againDebangWuliu = async (data) => {
  return request({
    url: '/server/AgainDebangWuliu',
    method: 'get',
    data
  })
}

// 重推京东
const AgainJingJDWuliu = async (data) => {
  return request({
    url: '/server/AgainJingJDWuliu',
    method: 'get',
    data
  })
}

// 改变书籍数量
const updateOrderItemNubmer = async (data) => {
  return request({
    url: '/order/UpdateOrderItemNubmer',
    method: 'get',
    data
  })
}

export { getOrderList, getOrderDetile, updateOderStatus, updateOderQujian, getWuliuMessage, ChaxunJD, updateOrderItemShenghe, UpdateOrderHoutaibei, againDebangWuliu, AgainJingJDWuliu, updateOrderItemNubmer }
